#ifndef MODEL
#define MODEL

/* Standard C++ headers */
/* MySQL Connector/C++ specific headers */
#include <mysql++.h>
using namespace std;


class Model
{
	public:

		void test();
		vector<map<string,string> > find();
		string name;

	private:
		void open();
		void close();
};

List<map<string,string> >  Model::find(){
	List<map<string,string> > rt;

	return rt;
}


void Model::open(){
	// Get database access parameters from command line
		const char* db = 0, *server = 0, *user = 0, *pass = "";

		try {
			// Connect to server, then dump a bunch of stuff we find on it
			mysqlpp::Connection con("mysql_cpp_data", "127.0.0.1", "rooqt", "123456");

		}
		catch (const mysqlpp::BadQuery& er) {
			// Handle any query errors
			cerr << "Query error: " << er.what() << endl;

		}
		catch (const mysqlpp::Exception& er) {
			// Catch-all for any other MySQL++ exceptions
			cerr << "Error: " << er.what() << endl;

		}
}

void Model::close(){

}

void Model::test(){
open();

}
#endif
